$def with (directory, files_meta)

$:render.header(directory)

<table id="explorer">
    <thead>
        <tr>
            <th class="type">type</th>
            <th class="permission">permission</th>
            <th class="owner">owner</th>
            <th class="group">group</th>
            <th class="path-name">name</th>
            <th class="last-modified">last modified</th>
            <th class="size">size</th>
            <th class="download">download</th>
            <th class="tags">tags</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td colspan="4">&nbsp;</td>
            <td colspan="3">
                $for dir in navigate_backwards(directory):
                    $if loop.last:
                        $dir
                    $else:
                        <a href="explorer?directory=$dir">$dir</a><br />
            </td>
        </tr>
        $for file_meta in files_meta:
            <tr>
                <td class="type">$file_meta.type</td>
                <td class="permission">$file_meta.permission</td>
                <td class="owner">$file_meta.owner</td>
                <td class="group">$file_meta.group</td>
                <td class="path-name">$:link_from_file_meta(file_meta)</td>
                <td class="last-modified">$file_meta.last_modified</td>
                <td class="size">$size_h(file_meta.size)</td>
                <td class="download">$:download_file_link(file_meta)</td>
                <td class="tags">
                    <input type="text" name="tag-value-$file_meta.file_id" id="tag-value-$file_meta.file_id" size="8" maxlength="20" />
                    <img src="/static/tag-insert.png" class="insert" alt="add tag for $file_meta.file.name" file_id="$file_meta.file_id" />
                </td>
            </tr>
    </tbody>
</table>
